package com.starry.module.system.core.oauth2.authorization.third;

import com.starry.module.system.core.oauth2.entity.Oauth2ThirdAccount;
import com.starry.module.system.core.oauth2.entity.Oauth2ThirdClient;

/**
 * 第三方客户端
 *
 * @author xiaoke
 */
public interface ThireClient {

    /**
     * 获取用户信息
     *
     * @param code  授权码
     * @param state 随机码
     * @return Oauth2ThirdAccount
     */
    Oauth2ThirdAccount loadUser(String code, String state) throws Exception;

    /**
     * 获取第三方客户端配置
     *
     * @return Oauth2ThirdClient
     */
    Oauth2ThirdClient getThirdClientConfig();

}
